Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FUZZER] Multiple utils and library refactor, fuzzers #15176

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zi0Black
Copy link
Contributor

@zi0Black zi0Black commented Nov 4, 2024

Description

New structure for utils:

./utils
├── authenticator.rs
├── helpers.rs 
├── mod.rs
└── vm.rs

helpers.rs contains generic data structures and helpful functions. Specific data structures or functions for specific fuzzers are now located in vm.rs and authenticator.rs.

testsuite/fuzz/src/main.rs is now a CLI that introduces helpful commands to build fuzzers. Currently, only compile_federated_jwk has been introduced, but others can be ported. This is a good PoC to show how to generate custom scripts/modules and embed them in the fuzzer's code if required for the setup. A new data folder is now present, which is used for support files for the new CLI.

I turned all the fuzzers back on, as the build now works as expected on OSS-Fuzz.

How Has This Been Tested?

./fuzz.sh test

Key Areas to Review

N/A

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Nov 4, 2024

⏱️ 39m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-move-tests 9m 🟩
rust-move-tests 9m 🟩
rust-move-tests 9m
rust-cargo-deny 5m 🟩🟩🟩
check-dynamic-deps 3m 🟩🟩🟩
general-lints 1m 🟩🟩🟩
semgrep/ci 1m 🟩🟩🟩
file_change_determinator 36s 🟩🟩🟩
permission-check 11s 🟩🟩🟩
permission-check 8s 🟩🟩🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@@ -97,6 +112,11 @@ When building in the OSS-Fuzz environment, `fuzz.sh` will place the corpus archi
- **Error Handling:** Implement robust error handling to intercept crashes or unwanted/unexpected behavior.
- **Performance Optimization:** Optimize for performance to enable more iterations and deeper fuzzing.

## fuzzer CLI
`cargo run fuzzer <command>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this replace fuzz.sh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can; I haven't decided about it yet. So far, it’s helpful for accessing data structures and functionalities of other suites in Rust. Thought, most of the utilities would basically call other binaries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may be confusing having two different utilities for the same purpose. can the functionality here be included in fuzz.sh ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can call It from the script, but it seems a bit layered, let me think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants